﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!--jQuery-->
    <script type="text/javascript" src="/assets/scripts/jquery-1.5.1.min.js"></script>
    <!--form validation-->
    <script type="text/javascript" src="/assets/scripts/jquery.validate.js"></script>
    <script type="text/javascript" src="/assets/scripts/jquery.datePicker.js"></script>
    <script type="text/javascript" src="/assets/scripts/date.js"></script>
    <script type="text/javascript" src="/assets/scripts/jquery.qtip.js"></script>
    <!--[if IE]><script type="text/javascript" src="/assets/scripts/jquery.bgiframe.js"></script><![endif]-->
    <!--css-->
    <link rel="stylesheet" href="/assets/css/reset.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="/assets/css/main.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="/assets/css/tabber.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="/assets/css/datePicker.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="/assets/css/jquery.qtip.css" type="text/css" media="screen" />
    <!--[if lt IE 7]>
    <link rel="stylesheet" href="/assets/ie6/ie6.css" type="text/css" media="screen"/>
    <![endif]-->
    <!--[if lt IE 8]>
    <script src="/assets/scripts/IE8.js" type="text/javascript"></script>
    <![endif]-->
    <script type="text/javascript">
        $(document).ready(function () {
            jQuery.validator.setDefaults({

                success: $.noop,
                focusCleanup: true,
                onfocusout: true,
                errorPlacement: function (error, element) {
                    var elem = $(element);
                    if (!error.is(':empty')) {
                        elem.qtip({
                            content: error.text(),
                            show: { when: { event: 'none' }, ready: true },
                            hide: false,
                            position: {
                                my: 'center left', // Use the corner...
                                at: 'center right' // ...and opposite corner
                            }
                        });
                    }
                    else {
                        elem.qtip('destroy');
                    }
                }
            });

            $('.date-pick').datePicker({ startDate: '01/01/1996' }); //initiates datepicker, in this case with a begin date of 01/01/1996; earlier dates cannot be selected
            $("a.close").click(function () { $(this).parent().slideUp(); return false; });  //links with class 'close' close parent div
        });
    </script>
</head>
<body id="b_main">
    <div id="header">
        <div id="logo">
            <h1 id="header_broomcupboard">
                <span class="logonew"></span>
            </h1>
            <h4 id="header_strapline">
            </h4>
            <ul id="welcome">
                <li><a href="/account/LogOff">退出</a></li>
                <li>欢迎 <strong>yuanyue</strong></li>
            </ul>
            <!--/end #welcome-->
        </div>
        <!--/end #logo-->
    </div>
    <script type="text/javascript">
        function show(id) {
            $("#" + id).show();
        }
        function hide(id) {
            $("#" + id).hide();
        }
        function toggle(id) {
            $("#" + id).toggle();
        }
        function associate(master, slave) {
            if ($("#" + master).attr("checked") == false)
                hide(slave);
        }
    </script>
    <!--/end #header-->
    <div id="wrapper">
        <!--holds pretty much everything-->
        <!--/end #menu_main-->
        <div id="content">
            <div class="tabber">
                <div class="tabberlive">
                    <ul class="tabbernav">
                    </ul>
                </div>
            </div>
            <form action="/doc/edit0" class="broom_form" id="form1" method="post" style="margin-left: 30px;">
            <input data-val="true" data-val-number="字段 DocID 必须是一个数字。" data-val-required="DocID 字段是必需的。"
                id="DocID" name="DocID" type="hidden" value="10006" />
            <br />
            <br />
            <table cellspacing="0" summary="table" class="broom_table" width="90%">
                <tbody>
                    <tr class="odd">
                        <td>
                            1
                        </td>
                        <td>
                            <span>入组日期</span> <span style="color: Red">*</span>
                        </td>
                        <td>
                            <div class="rili">
                                <input class="inputbox date-pick" id="InputTime" name="InputTime" readonly="readonly"
                                    type="text" value="" />
                            </div>
                        </td>
                        <td>
                            <a href="#" class="table_comment1" onclick="question('InputTime',0,'入组日期');" title="存在已关闭质疑">
                                comment</a>
                        </td>
                    </tr>
                    <tr class="even">
                        <td>
                            2
                        </td>
                        <td>
                            姓名 <span style="color: Red">*</span>
                        </td>
                        <td>
                            <input class="inputbox" id="PatientName" name="PatientName" type="text" value="邢慧敏" />
                        </td>
                        <td>
                            <a href="#" class="table_comment1" onclick="question('PatientName',0,'患者姓名');" title="存在已关闭质疑">
                                comment</a>
                        </td>
                    </tr>
                    <tr class="odd">
                        <td>
                            3
                        </td>
                        <td>
                            年龄
                        </td>
                        <td>
                            <input class="inputbox" data-val="true" data-val-number="字段 PatientAge 必须是一个数字。"
                                id="PatientAge" name="PatientAge" type="text" value="13" />
                        </td>
                        <td>
                            <a href="#" class="table_comment1" onclick="question('PatientAge',0,'患者年龄');" title="存在已关闭质疑">
                                comment</a>
                        </td>
                    </tr>
                    <tr class="even">
                        <td>
                            4
                        </td>
                        <td>
                            性别
                        </td>
                        <td>
                            <input id="PatientSex" name="PatientSex" type="radio" value="男" />男
                            <input id="PatientSex" name="PatientSex" type="radio" value="女" />女
                        </td>
                        <td>
                            <a href="#" class="table_comment0" onclick="question('PatientSex',0,'患者性别');" title="添加质疑">
                                comment</a>
                        </td>
                    </tr>
                    <tr class="odd">
                        <td>
                            5
                        </td>
                        <td>
                            职业
                        </td>
                        <td>
                            <input class="inputbox" id="PatientJob" name="PatientJob" type="text" value="" />
                        </td>
                        <td>
                            <a href="#" class="table_comment0" onclick="question('PatientJob',0,'患者职业');" title="添加质疑">
                                comment</a>
                        </td>
                    </tr>
                    <tr class="even">
                        <td>
                            6
                        </td>
                        <td>
                            联系电话 <span style="color: Red">*</span>
                        </td>
                        <td>
                            <input class="inputbox" id="PatientTel" name="PatientTel" type="text" value="13691821398" />
                        </td>
                        <td>
                            <a href="#" class="table_comment0" onclick="question('PatientTel',0,'患者联系电话');" title="添加质疑">
                                comment</a>
                        </td>
                    </tr>
                    <tr class="odd">
                        <td>
                            7
                        </td>
                        <td>
                            家庭住址
                        </td>
                        <td>
                            <input class="inputbox" id="PatientAddress" name="PatientAddress" type="text" value="" />
                        </td>
                        <td>
                            <a href="#" class="table_comment0" onclick="question('PatientAddress',0,'患者家庭住址');"
                                title="添加质疑">comment</a>
                        </td>
                    </tr>
                </tbody>
            </table>
            <table style="border: 0px;">
                <tr>
                    <td>
                        <div class="button">
                            <div class="btn-inner">
                                <span><em>
                                    <button type="submit" name="buttonsave">
                                        <img src="/assets/img/icons/disk_black.png" alt="" />保存数据</button>
                                </em></span>
                            </div>
                        </div>
                    </td>
                    <td>
                        <div class="button">
                            <div class="btn-inner">
                                <span><em>
                                    <button type="submit" name="buttonredirect">
                                        <img src="/assets/img/icons/disk_black.png" alt="" />保存数据进入下一步</button>
                                </em></span>
                            </div>
                        </div>
                    </td>
                    <td>
                    </td>
                </tr>
            </table>
            </form>
            <!--/end .tabber-->
        </div>
    </div>
    <div class="clear">
    </div>
    <script type="text/javascript">
        function question(field, type, description) {
            $("#framequestion").attr("src", "/doc/question?docid=10006&field=" + field + "&type=" + type + "&description=" + encodeURIComponent(description));
        }

        $(document).ready(function () {
            $('.table_comment,.table_comment0,.table_comment1').qtip({
                id: 'modal', // Since we're only creating one modal, give it an ID so we can style it
                content: {
                    text: $('#divquestion'),
                    title: {
                        text: ' ',
                        button: true
                    }
                },
                position: {
                    my: 'center', // ...at the center of the viewport
                    at: 'center',
                    target: $(window)
                },
                show: {
                    event: 'click', // Show it on click...
                    solo: true, // ...and hide all other tooltips...
                    modal: true
                    //ready: true  // ...and make it modal
                },
                hide: false,
                style: 'ui-tooltip-light ui-tooltip-rounded'
            });
        });

    </script>
    <div style="display: none; width: 580px;" id="divquestion">
        <iframe id="framequestion" border="0" height="300" width="100%"></iframe>
    </div>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#form1").validate({
                rules: {
                    InputTime: "required",
                    PatientName: { required: true, maxlength: 15 },
                    PatientAge: { digits: true, range: [1, 120] },
                    PatientTel: { required: true, isPhone: true }
                },
                messages: {
                    InputTime: "入组日期不能为空",
                    PatientName: { required: "病人姓名不能为空", maxlength: "姓名太长" },
                    PatientAge: { digits: "请输入数字", range: "年龄范围不合法" },
                    PatientTel: { required: "请填写联系电话", isPhone: "请正确填写电话号码" }
                }
            })
            $("#InputTime").bind("change", function () {
                alert($("#form1").validate().element("#InputTime"));
            });
            $("#PatientName").bind("change", function () {

                alert($("#form1").validate().element("#PatientName"));
            });
        });
    </script>
</body>
</html>
